#============================================================
#    Data Management Monitor
#============================================================
# - datetime: 2022-11-24 22:00:33
#============================================================
## DataManagement 信号监听器
##[br]
##[br]添加到 [DataManagement] 类型的节点下边自动连接发出的属性改变信号。信号连接的顺序会因
##为节点创建的顺序而改变
class_name DataManagementMonitor
extends Node


@onready 
var _data_management := get_parent() as DataManagement
@onready
var _connected_signal = (func():
	if _data_management != null:
		_data_management.newly_added_property.connect(self._newly_added_property)
		_data_management.property_changed.connect(self._property_changed)
		_data_management.removed_property.connect(self._removed_property)
		return true
	else:
		printerr("父节点不是 DataManagement 类型的节点！ current_node = ", self)
		return false
).call()


#============================================================
#  SetGet
#============================================================
func get_data_management() -> DataManagement:
	return _data_management


#============================================================
#  自定义
#============================================================
func _newly_added_property(property, value):
	pass


func _property_changed(property, previous, current):
	pass


func _removed_property(property, value):
	pass


